home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 9866 / 9866.xpi / modules / rss / 2266.jsm < prev    next >
Encoding:
Text File  |  2009-09-22  |  872 b   |  38 lines

  1. Components.utils.import("resource://samfind/rss/samfind_modrssutils.jsm");
  2.  
  3. var EXPORTED_SYMBOLS = ["samfindRSSGetLink", "samfindRSSGetTitle", "samfindRSSGetDate", "samfindRSSGetImage", "samfindRSSGetContent"];
  4.  
  5. function samfindRSSGetLink(websiteRssUrl, item)
  6. {
  7.     var title = (item.getElementsByTagName("title"))[0];
  8.     if (title)
  9.     {
  10.         title = title.textContent;
  11.         var arr = /(\b(https?):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i.exec(title);
  12.         if (arr)
  13.         {
  14.             return "javascript:samfind_rss.goTo('" + arr[1] + "');";
  15.         }
  16.     }
  17.     return null;
  18. }
  19.  
  20. function samfindRSSGetTitle(websiteRssUrl, item)
  21. {
  22.     return null;
  23. }
  24.  
  25. function samfindRSSGetDate(websiteRssUrl, item)
  26. {
  27.     return null;
  28. }
  29.  
  30. function samfindRSSGetImage(websiteRssUrl, item)
  31. {
  32.     return null;
  33. }
  34.  
  35. function samfindRSSGetContent(websiteRssUrl, item, title, link)
  36. {
  37.     return " ";
  38. }